The present invention refers to a method and sensor assembly for the detection of substances by means of nuclear quadrupolar resonance and in presence of environmental interference. More specifically, the invention refers to the detection of forbidden substances hidden in garments, particularly in shoes, or in luggage.